//
//  RoutePlanningCell.m
//  didacar
//
//  Created by imac on 15/12/2.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "RoutePlanningCell.h"

@implementation RoutePlanningCell


-(void)configUpDowmStation:(UpdownstationModel *)upDownModel upStationModel:(UpdownstationModel *)upStationModel downStationModel:(UpdownstationModel *)downStationModel;{
    
    switch (upDownModel.Type) {
        case 0:
            self.leftImageView.image = [UIImage imageNamed:@"startPoint"];
            break;
        case 1:
            self.leftImageView.image = [UIImage imageNamed:@"icon_blue_click"];
            break;
        case 2:
            self.leftImageView.image = [UIImage imageNamed:@"icon_red_click"];
            break;
        case 3:
            self.leftImageView.image = [UIImage imageNamed:@"endPoint"];
            break;
        case 4:
            self.leftImageView.image = nil;
            break;
        default:
            break;
    }
    
    self.nameText.text = upDownModel.StationName;
    self.timeText.text = upDownModel.ArriveTime;
    
    if (upDownModel.id == upStationModel.id) {
        [self setSelectedTextStyle];
        self.leftImageView.image = [UIImage imageNamed:@"icon_get_on"];
    }
    if (upDownModel.id == downStationModel.id) {
        [self setNoramlTextStyle];
         self.leftImageView.image = [UIImage imageNamed:@"icon_get_off"];
    }
}

-(void)setSelectedTextStyle{
    self.nameText.font = [UIFont boldSystemFontOfSize:16];
}

-(void)setNoramlTextStyle{
    self.nameText.font = [UIFont systemFontOfSize:14];
}
@end
